package com.inexas.cu.stratus;

import javax.jdo.*;

/**
 * See http://code.google.com/appengine/docs/java/datastore/usingjdo.html
 */
public final class PMF {
    private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

    private PMF() {
    	// Hide the ctor
    }

    public static PersistenceManager getInstance() {
    	final PersistenceManager result = pmfInstance.getPersistenceManager();
    	result.setDetachAllOnCommit(true);
    	return result;
    }
}